package com.ruoyi.form.controller;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.form.service.ClassFormService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * **********************
 * * Author: XiaShiLong *
 * * Date  : 2021-04-01 *
 * * Time  : 11:42      *
 * * to    : lz&xm      *
 * **********************
 **/
@RestController
@RequestMapping("/classForm")
@Api("类表单")
public class ClassFormController {

    private final ClassFormService service;

    @Autowired
    public ClassFormController(ClassFormService service) {
        this.service = service;
    }

    @PreAuthorize("@ss.hasPermi('classForm:get:getHovList')")
    @ApiOperation("获取类属性绑定hov列表")
    @GetMapping("/{menuId}/{classPath}")
    public AjaxResult getHovList(@PathVariable Long menuId, @PathVariable String classPath) {
        return AjaxResult.success(service.getHovList(menuId, classPath));
    }
}
